package com.itheima.Mapper;

import com.itheima.Pojo.Punishment;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


import java.util.List;

@Mapper
public interface punishmentMapper {
    @Select("select * from punishment")
    List<Punishment> SelectAll();

    @Delete("delete from punishment where record_id = #{id}")
    void deleteById(Integer id);

    @Insert("insert into  punishment (record_id,student_id,teacher_id,level,record_time,review_status,description) values(#{recordId},#{studentId},#{teacherId},#{level},#{recordTime},#{reviewStatus},#{description})")
    void addPunishment(Punishment punishment);


    void updateById(Punishment punishment);
}
